/*
 *  This file is part of LifeBudget - Copyright 2010 Clifton Eaton
 *  ------------------------------------------------------------------
 *  LifeBudget is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  LifeBudget is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with LifeBudget.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.lifebudget.app.client.service;

import java.util.List;

import org.lifebudget.app.client.mvc.model.CategoryAmount;
import org.lifebudget.app.client.mvc.model.LoginInfo;
import org.lifebudget.app.client.mvc.model.PaycheckCalculator;
import org.lifebudget.app.server.LoginServiceImpl;
import org.lifebudget.app.server.PaycheckCalculatorServiceImpl;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * defines the RPC methods to be implemented  by the GWT proxy for 
 * {@link PaycheckCalculatorServiceAsync} and for the {@link PaycheckCalculatorServiceImpl}. 
 * Handles client-server communication for {@link PaycheckCalculator} operations.
 */
@RemoteServiceRelativePath("paycheck")
public interface PaycheckCalculatorService extends RemoteService {
	
	/**
	 * Gets the all paycheck calculators.
	 *
	 * @return the all paycheck calculators
	 */
	public List<PaycheckCalculator> getAllPaycheckCalculators();

	/**
	 * Adds the paycheck calculator.
	 *
	 * @param paycheck the paycheck to add
	 * @return the paycheck calculator with an updated id 
	 * 				field after being added
	 */
	public PaycheckCalculator addPaycheckCalculator(PaycheckCalculator paycheck);

	/**
	 * Delete paycheck calculator.
	 *
	 * @param paycheck the paycheck
	 */
	public void deletePaycheckCalculator(PaycheckCalculator paycheck);

	/**
	 * Removes the category amount.
	 *
	 * @param categoryAmount the category amount
	 */
	public void removeCategoryAmount(CategoryAmount categoryAmount);

	/**
	 * Update category amounts.  Adds any {@link CategoryAmount} objects
	 * that are new.
	 *
	 * @param payCalcId the pay calc id
	 * @param categoryAmounts the category amounts to add/update
	 * @return the list of current {@link CategoryAmount} objects after
	 * 				the update.
	 */
	public List<CategoryAmount> updateCategoryAmounts(Long payCalcId, List<CategoryAmount> categoryAmounts);

	/**
	 * Update paycheck calculator.
	 *
	 * @param paycheck the paycheck
	 */
	public void updatePaycheckCalculator(PaycheckCalculator paycheck);

}
